package com.bytezero.sprintbootqulick;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: Bytezero_zhengLei
 * @Date: 2024/6/24 9:43
 * @Project_Name:
 * @Email: 420498246@qq.com
 * @Description:
 * @TODO:
 */
@RestController
public class SpringbootDemo2 {
 //原始方式
//    @RequestMapping("/simple")
//    public String simpleParm(HttpServletRequest request){
//          String name = request.getParameter("name");
//          String age = request.getParameter("age");
//          System.out.println(name + "-------" + age);
//          return "ok"
//
//    }

    //Springboot
    @RequestMapping("/simple")
   public String simpleParm(String name,int age){
        System.out.println(name + "-------" + age);
        return "ok";
    }

}
